import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2022-11-16
 * Time: 8:42
 */
class Person{
    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(name, person.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
public class Test {
    public static void main(String[] args) {
        String[] strings = {"a","b","c"};
        for (String str:strings) {
            str="s";
        }
        System.out.println(strings[0]+strings[1]+strings[2]);
    }
    public static void main1(String[] agrs) {
      HashSet<Person> hashSet = new HashSet<>();
      hashSet.add(new Person("武松",19));
      hashSet.add(new Person("武松",113));
      System.out.println(hashSet);
    }
}
